package cn.antho.superhelp.domain;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author director
 * @since 2022-12-10
 */
@Data
@TableName("t_staff")
@NoArgsConstructor
@AllArgsConstructor
public class Staff extends Model<Staff> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 员工姓名
     */
    private String username;
    /**
     * 员工邮箱
     */
    private String email;
    /**
     * 员工电话
     */
    private String phone;
    /**
     * 盐值
     */
    private String salt;
    /**
     * 密码
     */
    private String password;
    /**
     * 年龄
     */
    private Integer age;
    /**
     * 状态
     */
    private Integer state;
    /**
     * 部门id
     */
    @TableField("department_id")
    private Long departmentId;
    /**
     * 登录id
     */
    @TableField("logininfo_id")
    private Long logininfoId;
    /**
     * 岗位id
     */
    @TableField("position_id")
    private Long positionId;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Staff{" +
        ", id=" + id +
        ", username=" + username +
        ", email=" + email +
        ", phone=" + phone +
        ", salt=" + salt +
        ", password=" + password +
        ", age=" + age +
        ", state=" + state +
        ", departmentId=" + departmentId +
        ", logininfoId=" + logininfoId +
        ", positionId=" + positionId +
        "}";
    }
}
